﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using Domep.Server.BusinessObjects;
using Domep.Server.Kernel.DBCommunication;

namespace Domep.Server.API
{
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
    public class AppliancePresentationManager : IAppliancePresentationManager
    {
        #region IAppliancePresentationManager Members

        public List<AppliancePresentation> GetAppliancesList()
        {
            ApplianceRetriever applianceRetriever = new ApplianceRetriever();
            List<AppliancePresentation> appliancePresentations = new List<AppliancePresentation>();
            foreach (Appliance a in applianceRetriever.GetAppliances())
            {
                appliancePresentations.Add(new AppliancePresentation(a));
            }
            return appliancePresentations;
        }

        public List<FunctionalityPresentation> GetFunctionalities(int applianceId)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}